package com.yanqu.road.server.cmd.chefduel.process2.auto;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.chefduel.ChefDuelProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.chefduel.CrossChefDuelMgr;
import com.yanqu.road.server.protocol.Protocol;

/**
 * @Author : Cxp
 * @Time : 2024-11-29
 * @Description : 小当家第2阶段跨服获取自动回访记录
 */

@Cmd(code = Protocol.C_CROSS_CHEF_DUEL2_GET_AUTO_JOIN_RECORD, desc = "小当家第2阶段跨服获取自动回访记录")
public class CrossGetAutoJoinRecordCmd extends CrossCommand {
    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        ChefDuelProto.CrossChefDuel2GetAutoJoinRecordMsg reqMsg = ChefDuelProto.CrossChefDuel2GetAutoJoinRecordMsg.parseFrom(packet.getBytes());
        long userId = packet.getPlayerId();
        int activityId = reqMsg.getActivityId();
        CrossChefDuelMgr.getAutoJoinRecord(activityId, serverId, userId);
    }

    @Override
    public void sendData() {
    }
}
